<?php


namespace app\backend\controller;

use app\backend\service\CountAdvService;

class CountAdv extends Backend
{

    /**
     * 广告统计
     * @param CountAdvService $service
     * @return string|\think\response\Json
     */
    public function index(CountAdvService $service)
    {
        if ($this->request->isAjax()) {
            $data = $service->lists($this->request->param());
            return $this->success($data);
        }
        return $this->fetch();
    }

    /**
     * 手动输入
     * @param CountAdvService $service
     * @return string|\think\response\Json
     */
    public function editRowField(CountAdvService $service)
    {
        return $this->success($service->editRowField($this->request->param()));
    }
}